﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;

namespace Entity
{

    /// <summary>
    /// 供应商管理
    /// </summary>
    public class WMSBasicSupplierManagement
    {
        /// <summary>供应商id</summary>
        public long supplier_id { get; set; }

        /// <summary>供应商编码</summary>
        public string supplier_code { get; set; }

        /// <summary>供应商名称</summary>
        public string supplier_name { get; set; }

        /// <summary>所属行业</summary>
        public int indInd { get; set; }

        /// <summary>供应商分类</summary>
        public int supplier_classification { get; set; }

        /// <summary>联系人</summary>
        public string contact_person { get; set; }

        /// <summary>联系电话</summary>
        public string contact_phone_number { get; set; }

        /// <summary>电子邮箱</summary>
        public string email_address { get; set; }

        /// <summary>进货部门ID</summary>
        public int purchasing_department_id { get; set; }

        /// <summary>进货负责人ID</summary>
        public int purchasing_manager_id { get; set; }

        /// <summary>供应商地址</summary>
        public string suppliers_address { get; set; }

        /// <summary>账号名称</summary>
        public string account_name { get; set; }

        /// <summary>纳税人识别号</summary>
        public string taxid { get; set; }

        /// <summary>银行账户</summary>
        public string bank_account { get; set; }

        /// <summary>开户银行</summary>
        public string opening_bank { get; set; }

        /// <summary>开户银行地址</summary>
        public string bkaddr { get; set; }

        /// <summary>状态</summary>
        public string status { get; set; }

        /// <summary>备注</summary>
        public string note { get; set; }
        /// <summary>创建人</summary>
        public string create_by { get; set; }

        /// <summary>创建时间</summary>
        public string create_time { get; set; }

        /// <summary>修改人</summary>
        public string update_by { get; set; }

        /// <summary>修改时间</summary>
        public string update_time { get; set; }

        /// <summary>附件编号</summary>
        public string annex_code { get; set; }
        /// <summary>逻辑删除</summary>
        public string is_delete { get; set; }
    }


    /// <summary>
    /// 供应商添加请求模型
    /// </summary>
    public class SupplierAddRequest
    {
        // 1. 供应商基础字段（与前端FormData字段名完全一致）
        public string supplier_code { get; set; }
        public string supplier_name { get; set; }
        public int indInd { get; set; }
        public int supplier_classification { get; set; }
        public string contact_person { get; set; }
        public string contact_phone_number { get; set; }
        public string email_address { get; set; }
        public int purchasing_department_id { get; set; }
        public int purchasing_manager_id { get; set; }
        public string suppliers_address { get; set; }
        public string account_name { get; set; }
        public string taxid { get; set; }
        public string bank_account { get; set; }
        public string opening_bank { get; set; }
        public string bkaddr { get; set; }
        public string status { get; set; }
        public string note { get; set; }
        public string create_by { get; set; }
        public string create_time { get; set; }
        public string annex_code { get; set; }
    }

    /// <summary>
    /// 供应商列表显示DTO（含新增字段）
    /// </summary>
    public class SupplierListDTO
    {
        public string? id { get; set; }            // 编号
        public string code { get; set; }          // 供应商编号
        public string name { get; set; }          // 供应商名称
        public string industry { get; set; }      // 所属行业
        public string category { get; set; }      // 供应商分类
        public string contact { get; set; }       // 联系人
        public string phone { get; set; }         // 联系电话
        public string email { get; set; }         // 电子邮箱
        public string dept { get; set; }          // 进货部门
        public string manager { get; set; }       // 进货负责人
        public string status { get; set; }        // 状态
        public string address { get; set; }       // 供应商地址
        public string accountName { get; set; }   // 账户名称
        public string taxid { get; set; }         // 纳税人识别号
        public string bankAccount { get; set; }   // 银行账户
        public string openingBank { get; set; }   // 开户银行
        public string bankAddress { get; set; }   // 开户行地址
        public string createBy { get; set; }      // 操作人（创建人）
        public string createTime { get; set; }    // 操作时间（创建时间）
    }
}
